import request from '@/utils/request'
// 门店中心
export function getStoreCenter(params) {
  return request({
    url: '/UserServiceApi/storeCenter',
    method: 'get',
    params
  })
}

// 门店商品
export function getStoreGoods(data) {
  return request({
    url: '/UserApi/store_goods',
    method: 'post',
    data
  })
}
// 门店商品上架/下架/推荐
export function setStoreGoodsSaleItem(data) {
  return request({
    url: '/UserApi/selectSaleItem',
    method: 'post',
    data
  })
}

// 分销商
export function getNextLevelAgent(data) {
  return request({
    url: '/UserApi/next_level_agent',
    method: 'post',
    data
  })
}

// 门店会员
export function getNextLevelUser(data) {
  return request({
    url: '/UserApi/next_level_user',
    method: 'post',
    data
  })
}

// 团队订单
export function getStoreOrder(data) {
  return request({
    url: '/UserApi/fenxiao_order',
    method: 'post',
    data
  })
}

// 我的佣金
export function getMyCommission(data) {
  return request({
    url: '/UserApi/my_commission',
    method: 'post',
    data
  })
}
// 职乐验证
export function getGzll(param) {
  return request({
    url: '/UserApi/gzll',
    method: 'get',
    param
  })
}

// 佣金转余额
export function cashToBalance(data) {
  return request({
    url: '/UserApi/cashBalance',
    method: 'post',
    data
  })
}
// 佣金提现
export function doTX(data) {
  return request({
    url: '/UserApi/tx',
    method: 'post',
    data
  })
}
// 佣金转预存款
export function commissionToDeposit(data) {
  return request({
    url: '/UserApi/commissionToDeposit',
    method: 'post',
    data
  })
}

// 佣金排行
export function getCommissionSort(data) {
  return request({
    url: '/UserApi/commissionSort',
    method: 'post',
    data
  })
}
// 店中店
export function getStore(params) {
  return request({
    url: '/UserActivityApi/store',
    method: 'get',
    params
  })
}
// 编辑店中店
export function editStore(data) {
  return request({
    url: '/UserActivityApi/editStore',
    method: 'post',
    data,
    type: 'file'
  })
}
// 我的上级
export function getDirector(params) {
  return request({
    url: '/UserApi/director',
    method: 'get',
    params
  })
}
// 我的名片
export function getFxCard(params) {
  return request({
    url: '/UserApi/fxCard',
    method: 'get',
    params
  })
}
// 我的名片
export function uploadCard(params) {
  return request({
    url: '/UserApi/uploadCard',
    method: 'get',
    params
  })
}
// 业绩统计
export function getCommissionContent(data) {
  return request({
    url: '/UserApi/commission_content',
    method: 'post',
    data
  })
}
// 门店订单详情
export function getFenxiaoOrderDetail(data) {
  return request({
    url: '/UserApi/fenxiao_order_detail',
    method: 'post',
    data
  })
}
// 提现明细
export function getWithdrawalsRecord(data) {
  return request({
    url: '/UserApi/withdrawals_record_ajax',
    method: 'post',
    data
  })
}
// 提现明细  确认
export function WithdrawalsRecordEnter(data) {
  return request({
    url: '/UserApi/withdrawals_record_ajax',
    method: 'post',
    data
  })
}

// 门店专题
export function getAgentList(data) {
  return request({
    url: '/UserApi/agent_list',
    method: 'post',
    data
  })
}

// 门店专题
export function resetStore(data) {
  return request({
    url: '/UserServiceApi/resetStore',
    method: 'post',
    data
  })
}

// 门店核销订单
export function getStorePcOrder(data) {
  return request({
    url: '/OrderApi/getStorePcOrder',
    method: 'post',
    data
  })
}
// 门店订单确认配送和发货操作
export function groupShoppingIsSuccess(data) {
  return request({
    url: '/OrderApi/groupShoppingIsSuccess',
    method: 'post',
    data
  })
}

// 门店订单确认配送和发货操作
export function distributeOrder(data) {
  return request({
    url: '/OrderApi/distributeOrder',
    method: 'post',
    data
  })
}

// 门店订单详情页
export function storeOrderDetail(params) {
  return request({
    url: '/OrderApi/storeOrderDetail',
    method: 'get',
    params
  })
}

// 门店订单核销数据列表
export function ajaxGetOrderVerifyItem(params) {
  return request({
    url: '/OrderApi/ajaxGetOrderVerifyItem',
    method: 'get',
    params
  })
}

// 门店订单核销
export function ajaxVerifyItem(data) {
  return request({
    url: '/OrderApi/ajaxVerifyItem',
    method: 'post',
    data
  })
}

// 收益查询
export function ServiceAwardCount(data) {
  // console.log(data)
  return request({
    url: '/orderApi/serviceAwardCount',
    method: 'post',
    data
  })
}

/**
 * 服务订单列表
 * @param {*} data param
 */
export function reqPostStoreServiceOrderList(data) {
  return request({
    url: '/OrderApi/storeServiceOrderList',
    method: 'post',
    data
  })
}

// 门店库存
export function GetStoreInventory(params) {
  return request({
    url: '/userApi/getStoreInventory',
    method: 'get',
    params
  })
}
